﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OopMethod
{
    internal class Person
    {

        private int _id = 1000;
        public Person()
        {
            Console.WriteLine("无参数构造方法");
        }

        public string Name { get; set; } = string.Empty;
        public int Age { get; set; } = 0;

        public Person(string name)
        {
            Console.WriteLine("有一个name参数的构造方法");
            Name = name;
        }

        public Person(string name, int age) : this(name)
        {
            Console.WriteLine("有两个参数的构造方法");
            Age = age;
        }

        
    }
}
